<?php
/*
    ID:   $Id: $
    File: taskModel.php
    Name: John Griffin
    Date: April 26, 2009
*/
require_once 'BreakdownException.php';
require_once 'URLToSQL.php';

class TaskModel {
    private $pdo = null;
    private $converter = null;
    
    public function __construct (PDO $pdo) {
        $variables = array ('id' => 'int', 'modified' => 'date', 'subject' => 'string', 'path' => 'string', 'body' => 'string');
	$this->converter = new URLToSQL ($variables);
        $this->pdo = $pdo;
    }

    public function query (array $filter, array $modifiers = array ()) {
        $sql = $this->converter->buildQuery ($filter, $modifiers);
	$result = $this->pdo->execute ($sql);
        return $result;
    }
    
    public function post (array $record) {
	$insert_record == false;
	if (isset ($record['id']) == true) {
	}
    }
    
    public function delete ($id) {
    }
}
?>
